/*
 * lcd.h
 *
 *  Created on: 2016-5-5
 *      Author: Billli
 */

#ifndef LCD_H_
#define LCD_H_

#include "myinclude.h"
#include "system.h"


#define SET_LCDRS	IOWR(LCD12864RS_BASE,0,1)
#define CLR_LCDRS	IOWR(LCD12864RS_BASE,0,0)
#define SET_LEDA	IOWR(LCDLEDA_BASE,0,1)
#define CLR_LEDA	IOWR(LCDLEDA_BASE,0,0)
#define SET_LCDRST	IOWR(LCD12864RST_BASE,0,1)
#define CLR_LCDRST	IOWR(LCD12864RST_BASE,0,0)


extern void lcd_clear(void);
extern void lcd_clear_page(unsigned char page_num);
extern void Lcd_Init();
extern void lcd_addr(unsigned char page,unsigned char column);
extern void disp_graph_8x16(unsigned char page,unsigned char column,const unsigned char *dp,unsigned char sytle);
extern void disp_graph_16x16(unsigned char page,unsigned char column,const unsigned char *dp,unsigned char style);
extern void disp_graph_6x7(unsigned char page,unsigned char column,const unsigned char *dp,unsigned char style);

//extern void DispStringAt(unsigned char x,unsigned char y,char *str,unsigned char style);
//extern void DispDecAt(unsigned char x,unsigned char y,int dat,unsigned char len,unsigned char style);
//extern void  DispHexAt(unsigned char x,unsigned char y,long dat,unsigned char len,unsigned char style);
//extern void DispFloatAt(unsigned char x,unsigned char y,float dat,unsigned char len1,unsigned char len2 ,unsigned char style);


/*=======5*7========*/
extern void DispString67At(unsigned char x,unsigned char y,char *str,unsigned char style);
extern void DispDec67At(unsigned char x,unsigned char y,long dat,unsigned char len,unsigned char style);
extern void DispHex67At(unsigned char x,unsigned char y,long dat,unsigned char len,unsigned char style);
extern void DispFloat67At(unsigned char x,unsigned char y,float dat,unsigned char len1,unsigned char len2,unsigned char style );

#endif /* LCD_H_ */
